import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const HomePage = (resolve) => require(['@/views/Home'], resolve)
const Login = (resolve) => require(['@/views/login'], resolve)
const RoleForm = (resolve) => require(['@/views/components/form/roleForm'], resolve)
const UserForm = (resolve) => require(['@/views/components/form/userForm'], resolve)
const MobilePage = (resolve) => require(['@/views/mobile'], resolve)
const routes = [{
    path: '/',
    name: 'Home',
    component: HomePage
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/roleForm',
    name: 'RoleForm',
    component: RoleForm
  },
  {
    path: '/userForm',
    name: 'UserForm',
    component: UserForm
  }, {
    path: '/mobile',
    name: 'MobilePage',
    component: MobilePage
  }
]

const router = new VueRouter({
  mode: 'hash',
  routes
})

export default router
